Skip to content

feat(core): Default span status to ok in transaction mode - #22521

Merged
mydea merged 5 commits into
developfrom
fn/span-status-default
Jul 23, 2026
Merged

feat(core): Default span status to ok in transaction mode#22521
mydea merged 5 commits into
developfrom
fn/span-status-default

Conversation

@mydea

@mydea mydea commented Jul 23, 2026

Copy link
Copy Markdown
Member

We do this in node via opentelemetry span processing today, so if we remove this processing a bunch of tests fail for node which rely on span status being OK. I figured this makes sense and likely is more or less the same if this is ok or unset for a span, and also aligns with span streaming 🤔

Comment thread packages/core/src/utils/spanUtils.ts
Comment thread packages/core/src/utils/spanUtils.ts
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.79 kB +0.02% +3 B 🔺
@sentry/browser - with treeshaking flags 26.23 kB - -
@sentry/browser (incl. Tracing) 46.31 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.08 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.12 kB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Replay) 85.59 kB +0.01% +6 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.23 kB +0.01% +5 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 90.29 kB +0.01% +6 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB +0.01% +6 B 🔺
@sentry/browser (incl. Feedback) 44.96 kB +0.01% +4 B 🔺
@sentry/browser (incl. sendFeedback) 32.59 kB +0.02% +5 B 🔺
@sentry/browser (incl. FeedbackAsync) 37.64 kB +0.02% +6 B 🔺
@sentry/browser (incl. Metrics) 28.88 kB +0.02% +3 B 🔺
@sentry/browser (incl. Logs) 29.11 kB +0.02% +3 B 🔺
@sentry/browser (incl. Metrics & Logs) 29.8 kB +0.02% +3 B 🔺
@sentry/react 29.59 kB +0.02% +3 B 🔺
@sentry/react (incl. Tracing) 48.6 kB +0.02% +5 B 🔺
@sentry/vue 33.22 kB +0.01% +2 B 🔺
@sentry/vue (incl. Tracing) 48.28 kB +0.03% +10 B 🔺
@sentry/svelte 27.81 kB +0.02% +4 B 🔺
CDN Bundle 30.11 kB +0.01% +3 B 🔺
CDN Bundle (incl. Tracing) 48.16 kB -0.02% -5 B 🔽
CDN Bundle (incl. Logs, Metrics) 31.69 kB +0.01% +3 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 49.48 kB +0.01% +1 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay) 85.73 kB +0.01% +4 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.02 kB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 91.5 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.79 kB +0.01% +4 B 🔺
CDN Bundle - uncompressed 89.77 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 144.87 kB +0.02% +19 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.48 kB +0.03% +20 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.85 kB +0.02% +19 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.24 kB +0.01% +20 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.11 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.07 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.81 kB +0.01% +19 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.76 kB +0.01% +19 B 🔺
@sentry/nextjs (client) 51.13 kB +0.02% +6 B 🔺
@sentry/sveltekit (client) 46.75 kB +0.02% +8 B 🔺
@sentry/core/server 80.18 kB -0.01% -7 B 🔽
@sentry/core/browser 51.99 kB -0.02% -6 B 🔽
@sentry/node 124.64 kB +0.01% +6 B 🔺
@sentry/node (incl. diagnostics channel injection) 150.05 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.77 kB +0.01% +3 B 🔺
@sentry/aws-serverless 84.26 kB +0.01% +3 B 🔺
@sentry/cloudflare (withSentry) - minified 196.64 kB - -
@sentry/cloudflare (withSentry) 483.88 kB +0.01% +6 B 🔺

View base workflow run

Comment thread packages/opentelemetry/src/trace.ts Outdated
@@ -78,7 +78,7 @@ function _startSpan<T>(options: OpenTelemetrySpanContext, callback: (span: Span)
() => callback(span),
() => {
// Only set the span status to ERROR when there wasn't any status set before, in order to avoid stomping useful span statuses

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: The comment is now outdated.

Comment thread packages/opentelemetry/src/trace.ts Outdated
@@ -95,7 +95,7 @@ function _startSpan<T>(options: OpenTelemetrySpanContext, callback: (span: Span)
() => callback(span),
() => {
// Only set the span status to ERROR when there wasn't any status set before, in order to avoid stomping useful span statuses

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here too

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fe81e33. Configure here.

Comment thread packages/opentelemetry/src/applyOtelSpanData.ts
Comment thread packages/core/src/utils/spanUtils.ts
@mydea
mydea force-pushed the fn/span-status-default branch from fe81e33 to a360faa Compare July 23, 2026 08:27
@mydea
mydea marked this pull request as ready for review July 23, 2026 12:11
@mydea
mydea requested review from a team as code owners July 23, 2026 12:11
@mydea
mydea requested review from andreiborza, chargome, isaacs, logaretm, msonnb and nicohrubec and removed request for a team July 23, 2026 12:11
andreiborza

This comment was marked as resolved.

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@mydea
mydea merged commit 20aa3e5 into develop Jul 23, 2026
284 checks passed
@mydea
mydea deleted the fn/span-status-default branch July 23, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants